<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
        width: 200px;
        height: 200px;
        background-color: pink;
        padding: 20px;
        border: 1px solid black;
        box-sizing: border-box;
        /* 版心居中 */
        margin: auto;
    }
    </style>
</head>
<body>
    <div>版心居中</div>
</body>
</html>